package vip.xiaonuo.biz.modular.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import vip.xiaonuo.biz.modular.pojo.domain.BizGoodsTagRef;
import vip.xiaonuo.biz.modular.service.BizGoodsTagRefService;
import vip.xiaonuo.biz.modular.mapper.BizGoodsTagRefMapper;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
* @author LancerAdmin
* @description 针对表【biz_goods_tag_ref(商品分组标签关联信息)】的数据库操作Service实现
* @createDate 2024-02-29 14:54:24
*/
@Service
public class BizGoodsTagRefServiceImpl extends ServiceImpl<BizGoodsTagRefMapper, BizGoodsTagRef>
    implements BizGoodsTagRefService{

    @Override
    public List<String> getTagIdListByGoodsId(String goodsId){
        LambdaQueryWrapper<BizGoodsTagRef> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(BizGoodsTagRef::getGoodsId,goodsId);
        return this.list(queryWrapper).stream().map(BizGoodsTagRef::getTagId).collect(Collectors.toList());
    }
}




